package com.example.message2;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class ViewMessage extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_view_message);
		
		 findViewById(R.id.button2).setOnClickListener(       		 
	                new View.OnClickListener() {
	                        @Override
	                        public void onClick(View view) {
	                                Intent myIntent = new Intent(ViewMessage.this, MainActivity.class); 
	                                startActivityForResult(myIntent, 0);
	                        	//close();
	                                ViewMessage.this.finish();
	                        }
	                });	
		
		
		
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.view_message, menu);
		return true;
	}

}
